package com.sys.ai.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sys.common.annotation.Excel;
import com.sys.common.core.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;

/**
 * 知识库对象 ai_knowledge
 *
 * @author LGY
 * @date 2025-05-16
 */
@Data
@Accessors(chain = true)
@TableName("ai_knowledge")
@Schema(description = "知识库对象")
public class AiKnowledge extends BaseEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "ID")
    private String id;
    /**
     * 知识库名称
     */
    @Excel(name = "知识库名称")
    @TableField(value = "name")
    @Schema(description = "知识库名称")
    private String name;

    @Schema(description = "存储的向量数据库id")
    @TableField(value = "embedding_db_id")
    private String embeddingDbId;
    /**
     * 向量模型id
     */
    @Excel(name = "向量模型id")
    @TableField(value = "rank_model_id")
    @Schema(description = "向量模型id")
    private String rankModelId;

    @Schema(description = "rerank模型id")
    @TableField(value = "re_rank_model_id")
    private String reRankModelId;

    @Excel(name = "分片规则器")
    @Schema(description = "分片规则器")
    @TableField(value = "segment_type")
    private String segmentType;
    /**
     * 分片最大token数
     */
    @Excel(name = "分片最大字符数")
    @TableField(value = "max_segment")
    @Schema(description = "分片最大字符数")
    private Integer maxSegment;

    @TableField(value = "max_overlap")
    @Schema(description = "分片最大重叠字符数")
    private Integer maxOverlap;
    /**
     * 向量数据库class名称
     */
    @Excel(name = "向量数据库class名称")
    @TableField(value = "vector_db")
    @Schema(description = "向量数据库class名称")
    private String vectorDb;
    /**
     * 备注
     */
    @Excel(name = "备注")
    @TableField(value = "remark")
    @Schema(description = "备注")
    private String remark;
}